<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

use think\Route;
Route::get('api/:version/banner/:id','api/:version.Banner/getBanner');
Route::get('hello','api/v1.Banner/hello');
Route::get('api/:version/theme','api/:version.Theme/getSimpleList');
// 需要开启强制路由匹配，否则会被前一个匹配
Route::get('api/:version/theme/:id','api/:version.Theme/getComplexOne');
// 分组路由
Route::group('api/:version/product',function (){
    Route::get('recent','api/:version.Product/recent');
    Route::get('detail/:id','api/:version.Product/getDetailByID',[],['id'=>'\d+']);
});

Route::get('api/:version/category/all','api/:version.Category/getAllCategorys');
Route::get('api/:version/category/detail/:id','api/:version.Category/getCategoryById',[],['id'=>'\d+']);

Route::post('api/:version/token/user','api/:version.Token/getToken');

Route::post('api/:version/address','api/:version.Address/creatOrUpdate');

Route::post('api/:version/order','api/:version.Order/placeOrder');
